import request from "@/utils/request";
import { encryptionData } from "@/utils/com";
import Qs from "qs";
import { parseParams } from "@/utils/index";
const VUE_APP_API = process.env.VUE_APP_API;

// 分佣列表
export function sysSettlementCommissionList(data) {
  return request({
    url: `/pc/sysSettlementCommission/private/list`,
    method: "GET",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    params: data
  })
}
// 交易记录
export function tradingRecordList(data) {
  return request({
    url: `/pc/sysTransaction/private/findList`,
    method: "GET",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    params: data
  })
}
// 分佣详情
export function sysSettlementCommissionchargeDetails(data) {
  return request({
    url: `/pc/sysSettlementCommission/private/chargeDetails`,
    method: "GET",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    params: data
  })
}
// 账户信息
export function accountStatisticsInfo(data) {
  return request({
    url: `/jcd-payment/account/getInfo`,
    method: "GET",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    params: data
  })
}
// 标准账户集-总明细
export function standardAccountCollect(data) {
  return request({
    url: `/pc/accountStatistics/private/standardAccountCollect/detail`,
    method: "GET",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    params: data
  })
}
// 平台收益户明细
export function accountStatisticsplatformDetails(data) {
  return request({
    url: `/jcd-payment/accountLog/page`,
    method: "GET",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    params: data
  })
}
// 营销明细
export function accountStatisticsMarketingDetails(data) {
  return request({
    url: `/pc/accountStatistics/private/marketingAccount/detail`,
    method: "GET",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    params: data
  })
}
// 千豆结算户明细
export function accountStatisticsqdAccountDetails(data) {
  return request({
    url: `/pc/accountStatistics/private/qdAccountDetails`,
    method: "GET",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    params: data
  })
}
// 质保金账户明细
export function accountStatisticswarrantyDepositDetails(data) {
  return request({
    url: `/pc/accountStatistics/private/warrantyDepositDetails`,
    method: "GET",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    params: data
  })
}
// 汇入金--获取汇入金相关信息
export function getRemittanceInfo(data) {
  return request({
    url: "/payment/account/private/getRemittanceInfo",
    method: "post",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    data: Qs.stringify(data)
  })
}
// 品牌商质保金账户明细
export function warrantyDepositDetail(data) {
  return request({
    url: `/pc/accountStatistics/private/merchant/warrantyDepositDetail`,
    method: "GET",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    params: data
  })
}

// 提现记录
export function withdrawRecordList(data) {
  return request({
    url: "/payment/tlPaymentOrder/private/withdrawRecordList",
    method: "post",
    headers: encryptionData(data, '/citySubstation/substationLogin'),
    data: Qs.stringify(data)
  })
}
/* 结算分佣  暂没有用到*/
export function detailExport(data) {
  const a = document.createElement("a");
  let baseUrl = `${VUE_APP_API}/pc/sysSettlementCommission/public/export`;
  a.href = `${baseUrl}?${parseParams(data)}`;
  a.click()
}
/* **********************************************************/
